<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <div class="col-md-6">
        <ul class="nav nav-tabs">
            <li ><a href="{:url('coupon/index')}">优惠券列表</a></li>
            <li class="active"><a >发送优惠券</a></li>
        </ul>
        <form action="{:url('blog/coupon/add')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
            <div class="row">
                <div class="col-md-9">
                    <table class="table table-bordered">
                        <tr>
                            <input type="hidden" id="userid" name="userid" value="">
                            <th width="100">选择会员<span class="form-required">√</span></th>
                            <td>
                                <input class="form-control" readonly="readonly" type="text" style="width: 250px;" id="proid" name="proid" required value="" placeholder="选择会员"/>
                                <input type="button" value="选择会员" id="select" >
                            </td>
                        </tr>
                        <tr>
                            <th width="100">优惠券<span class="form-required">√</span></th>
                            <td>
                                <select name="coupon">
                                   <foreach name="coupon" item="vo">
                                    <option value="{$vo.id}">满{$vo.cause}减{$vo.money}</option>
                                   </foreach>
                                </select>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <button type="submit" class="btn btn-primary">提交</button>
        </form>
    </div>
</div>
</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript" src="__STATIC__/js/layer/layer.js"></script>
<script type="text/javascript" src="__STATIC__/js/product.js"></script>
</body>
<script>
    $('#select').click(function(){
        layer.open({
            type: 2,
            title: '选择商品',
            shadeClose: true,
            shade: false,
            maxmin: false, //开启最大化最小化按钮
            area: ['100%', '100%'],
            content: "{:url('coupon/user')}"//视图路径
        })
    })

</script>
</html>